//
//  KSLMenuToolBarButton.m
//  KSLMenuToolBar
//
//  Created by kensla on 14-8-13.
//  Copyright (c) 2014年 kensla. All rights reserved.
//

#import "KSLMenuToolBarButton.h"

@implementation KSLMenuToolBarButton

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    CGPoint center = self.imageView.center;
    center.x = self.frame.size.width/2;
    center.y = self.imageView.frame.size.height/2+2;
    self.imageView.center = center;
    
    CGRect frame = [self titleLabel].frame;
    frame.origin.x = 0;
    frame.origin.y = self.imageView.frame.size.height + 2;
    frame.size.width = self.frame.size.width;
    self.titleLabel.frame = frame;
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    
}

@end
